<extend name="Public/base"/>

<block name="body">
    <div class="cf">
		<div class="fl">
            <button class="btn ajax-post confirm" url="{:U('Collect/delCollectRule')}" target-form="ids">删 除</button>
        </div>

        <!-- 高级搜索 -->
		<div class="search-form fr cf">
			
		</div>
    </div>
        
        
    <div class="data-table table-striped">
           
            <table class="">
                <thead>
                    <tr >
                       <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                        <th>关键词</th>
                        <th>API-CID</th>
                        <th>商品分类</th>
                        <th>起始价格</th>
                        <th>最高价格</th>
                        <th>佣金比例下限</th>
                        <th>佣金比例上限</th>
                        <th>排序方式</th>
                        <th>第几页</th>
                        <th>每页数量</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                <volist name="_list" id="data">
                    <tr class="pointer even" title="">
                        <td><input class="ids" type="checkbox" name="id[]" value="{$data.id}" /></td>
                        <td><a href="{:U('Collect/index',array('id'=>$data['id']))}" target='_self'>{$data['name']}</a></td>
                        <td>{$data['q']}</td>
                        <td>{$data['cid']}</td>
                        <td>{$data['start_price']}</td>
                        <td>{$data['end_price']}</td>
                        <td>{$data['start_tk_rate']}</td>
                        <td>{$data['end_tk_rate']}</td>
                        <td>
                        	<switch name="data.sort">
                                     <case value="total_sales_desc">销量从高到低</case>
                                     <case value="total_sales_asc">销量从低到高</case>
                                     <case value="tk_rate_desc">佣金比率从高到低</case>
                                     <case value="tk_rate_asc">佣金比率从低到高</case>
                                     <case value="tk_total_sales_desc">累计推广量从高到低</case>
                                     <case value="tk_total_sales_asc">累计推广量从低到高</case>
                                     <case value="tk_total_commi_desc">总支出佣金从高到低</case>
                                     <case value="tk_total_commi_asc">总支出佣金从低到高</case>
                            </switch>
                        </td>
                        <td>{$data['page_no']}</td>
                        <td>{$data['page_size']}</td>
           
                        <td> 
                            <a href="{:U('Collect/index',array('id'=>$data['id']))}" target='_self'>去采集</a>
                            |
                            <a class="confirm ajax-get"  href="{:U('Collect/delCollectRule',array('id'=>$data['id']))}" title="删除">删除</a>
                        </td>
                    </tr>
                </volist>
                <else/>
				<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
                </tbody>
            </table></div>
    <div class="page">
        {$_page}
    </div>
</block>
    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
    <style>
        .orange{background:orange;}
    </style>
<script type="text/javascript">
    
    $(function(){
        $("tbody tr").click(function(){
            var obj = $(this);
            if(obj.find('td:first').attr('style')==''){
                obj.find('td').attr('style','background:orange');
            }else{
                obj.find('td').attr('style','');
            }
        });
    });
    (function(win,doc){
        var s = doc.createElement("script"), h = doc.getElementsByTagName("head")[0];
        if (!win.alimamatk_show) {
            s.charset = "utf8";
            s.async = true;
            s.src = "http://a.alimama.cn/tkapi.js";
            h.insertBefore(s, h.firstChild);
        };
        var o = {
            pid: "mm_43412205_9948295_33168978",/*推广单元ID，用于区分不同的推广渠道*/
            appkey: "23189880",/*通过TOP平台申请的appkey，设置后引导成交会关联appkey*/
            unid: "",/*自定义统计字段*/
            type: "click" /* click 组件的入口标志 （使用click组件必设）*/
        };
        win.alimamatk_onload = win.alimamatk_onload || [];
        win.alimamatk_onload.push(o);
    })(window,document);
</script>
